<%@ Page Language="C#" AutoEventWireup="true"
    Inherits="Soveryn.Commerce.Pages.CartShippingUpdate" MasterPageFile="~/Dummy.master" Codefile="CartShippingUpdate.aspx.cs" %>

<asp:Content ID="PageContent" ContentPlaceHolderID="PageContentPlaceHolder" runat="server">
    
    <div class="orderPageContent">
        <asp:UpdatePanel ID="MainUpdatePanel" runat="server">
            <ContentTemplate>
                <table class="fields" style="border-collapse: separate;border-spacing: 8px;">
                    <tr id="ShippingAddressDropDownPanel" runat="server">
                        <td style="text-align: right;"><b>My Shipping Addresses</b></td>
                        <td style="text-align: left;">
                            <asp:DropDownList ID="ShippingAddressDropDownList" Width="228" runat="server" DataTextField="AddressNickName"
                                DataValueField="AddressID" ValidationGroup="UpdateShippingInfoGroup" AutoPostBack="True"
                                OnSelectedIndexChanged="ShippingAddressDropDownList_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:LinkButton ID="DeleteAddressLinkButton" runat="server" Text="Delete" />
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Company </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipCompanyNameTextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>&nbsp; </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">First Name </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipFirstNameTextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipFirstNameValidator" runat="server" ControlToValidate="CartShipFirstNameTextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Last Name </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipLastNameTextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipLastNameValidator" runat="server" ControlToValidate="CartShipLastNameTextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Address </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipAddress1TextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipAddress1Validator" runat="server" ControlToValidate="CartShipAddress1TextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Address 2 </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipAddress2TextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">City </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipCityTextBox" runat="server" Width="228" ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipCityValidator" runat="server" ControlToValidate="CartShipCityTextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr id="StateRow" runat="server" visible="true">
                        <td style="text-align: right;">State </td>
                        <td style="text-align: left;">
                            <asp:DropDownList ID="CartShipStateProvIDCodeDropDown" runat="server" DataTextField="StateProvDisplayName"
                                DataValueField="StateProvIDPostalAbrev" ValidationGroup="UpdateShippingInfoGroup">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="CartShipStateProvIDCodeDropDownValidator1" runat="server"
                                ControlToValidate="CartShipStateProvIDCodeDropDown" ErrorMessage="Required" SetFocusOnError="true"
                                InitialValue="-1" ValidationGroup="UpdateShippingInfoGroup" Display="dynamic"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Zip </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipPostalCodeTextBox" runat="server" MaxLength="100" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipPostalCodeValidator" runat="server" ControlToValidate="CartShipPostalCodeTextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Country </td>
                        <td style="text-align: left;">
                            <asp:DropDownList ID="CountryDropDownList" ValidationGroup="UpdateShippingInfoGroup"
                                Width="235" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataValueField="CountryIDPostalAbrev"
                                DataTextField="CountryDisplayName" OnSelectedIndexChanged="CountryDropDownList_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator Display="dynamic" ID="CountyRequiredFieldValidator" InitialValue="-1"
                                ControlToValidate="CountryDropDownList" ValidationGroup="UpdateShippingInfoGroup"
                                runat="server" ErrorMessage="Required" SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Phone </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipPhoneTextBox" MaxLength="100" runat="server" Width="230"
                                ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="CartShipPhoneValidator" runat="server" ControlToValidate="CartShipPhoneTextBox"
                                Display="dynamic" ErrorMessage="Required" SetFocusOnError="true" ValidationGroup="UpdateShippingInfoGroup"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Fax </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipFaxTextBox" MaxLength="100" runat="server" ValidationGroup="UpdateShippingInfoGroup"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">Nickname: </td>
                        <td style="text-align: left;">
                            <asp:TextBox ID="CartShipNickNameTextBox" MaxLength="100" Width="230" runat="server"
                                ValidationGroup="UpdateShippingInfoGroup">Primary Shipping Address</asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td style="text-align: left;">
                            <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="MainUpdatePanel"
                                runat="server">
                                <ProgressTemplate>
                                    <img src="/Files/Themes/<%= Website.DesignFolder %>/loading.gif" alt="" />
                                </ProgressTemplate>
                            </asp:UpdateProgress>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:LinkButton ID="UpdateShippingInfoButton" runat="server" Text="Continue" AlternateText="Continue"
            ValidationGroup="UpdateShippingInfoGroup" OnClick="UpdateShippingInfoButton_Click" CssClass="buttonPositive" />
    </div>
</asp:Content>
